<template>
  <div>
    <div style="background: #ffffff; padding: 0 24px">
      <a-tabs :activeKey="currentActiveKey" @change="changeTabs" type="line">
        <a-tab-pane :key="3" tab="未退款"></a-tab-pane>
        <a-tab-pane :key="4" tab="已退款"></a-tab-pane>
        <a-tab-pane :key="5" tab="已作废"></a-tab-pane>
      </a-tabs>
    </div>
    <div>
      <superTable :types="currentActiveKey" @add="adds"></superTable>
    </div>
  </div>
</template>
<script>
import superTable from './component/superTable.vue'

export default {
  watch: {
    currentActiveKey() {
      this.currentActiveKey = this.currentActiveKey
    },
  },
  components: { superTable },
  data() {
    return {
      cp: {
        title: '标题',
        visible: false,
      },
      datas: [],
      currentActiveKey: 3,
    }
  },
  methods: {
    test() {
      this.cp.visible = true
    },
    changeTabs(key) {
      this.currentActiveKey = key
      console.log(this.currentActiveKey, key, typeof key)
    },
    adds(db, form) {
      console.log('？？？', db, this.$form)
      this.add.visible = true
      if (db) {
        console.log(this.form)
      }
    },
  },
}
</script>